package com.bm.server.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bm.server.dto.LotteryDto;
import com.bm.server.entity.Gift;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface LotteryDao extends BaseMapper<Gift> {
  @Select("SELECT g.giftname, g.gifturl FROM t_gift AS g    ORDER BY RAND() LIMIT 5")
    List<LotteryDto> five();
  @Select("SELECT g.giftname,g.gifturl FROM t_gift AS g    ORDER BY RAND() LIMIT 1")
      List<LotteryDto>  selectOne();
    
}
